package L01;

public class T07 {
    public static void main (String[] args) {
        Thread t=new Thread (()->{
                System.out.println ("begin");
                try {
                    Thread.sleep (2000);
                } catch (InterruptedException e) {
                    throw new RuntimeException (e);
                }
                System.out.println ("end");
        },"新线程");

        t.start ();


        System.out.println (t.isAlive ());

        try {
            Thread.sleep (3000);
        } catch (InterruptedException e) {
            throw new RuntimeException (e);
        }
        System.out.println (t.isAlive ());


    }
}
